package com.yunsc.product.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-04-17 20:15
 */
@Data
public class GoodsBaseDTO implements Serializable {

    @ApiModelProperty(value = "商品ID")
    private Integer goodsId;

    @ApiModelProperty(value = "商品名称")
    private String goodsName;

    @ApiModelProperty(value = "商品编码")
    private String goodsNo;

    @ApiModelProperty(value = "主图视频ID")
    private Integer videoId;

    @ApiModelProperty(value = "主图视频ID")
    private Integer videoCoverId;

    @ApiModelProperty(value = "商品卖点")
    private String sellingPoint;

    @ApiModelProperty(value = "商品规格(10单规格 20多规格)")
    private Integer specType;

    @ApiModelProperty(value = "商品价格(最低)")
    private String goodsPriceMin;

    @ApiModelProperty(value = "商品价格(最高)")
    private String goodsPriceMax;

    @ApiModelProperty(value = "划线价格(最低)")
    private String linePriceMin;

    @ApiModelProperty(value = "划线价格(最高)")
    private String linePriceMax;

    @ApiModelProperty(value = "库存总量(包含所有sku)")
    private Integer stockTotal;

    @ApiModelProperty(value = "库存计算方式(10下单减库存 20付款减库存)")
    private Integer deductStockType;

    @ApiModelProperty(value = "商品详情")
    private String content;

    @ApiModelProperty(value = "初始销量")
    private Integer salesInitial;

    @ApiModelProperty(value = "实际销量")
    private Integer salesActual;

    @ApiModelProperty(value = "配送模板ID")
    private Integer deliveryId;

    @ApiModelProperty(value = "是否开启积分赠送(1开启 0关闭)")
    private Integer isPointsGift;

    @ApiModelProperty(value = "是否允许使用积分抵扣(1允许 0不允许)")
    private Integer isPointsDiscount;

    @ApiModelProperty(value = "积分抵扣设置(0默认抵扣 1单独设置抵扣)")
    private Integer isAlonePointsDiscount;

    @ApiModelProperty(value = "单独设置积分抵扣的配置")
    private String pointsDiscountConfig;

    @ApiModelProperty(value = "是否开启会员折扣(1开启 0关闭)")
    private Integer isEnableGrade;

    @ApiModelProperty(value = "会员折扣设置(0默认等级折扣 1单独设置折扣)")
    private Integer isAloneGrade;

    @ApiModelProperty(value = "单独设置折扣的配置")
    private Object aloneGradeEquity;

    @ApiModelProperty(value = "商品状态(10上架 20下架)")
    private Integer status;

    @ApiModelProperty(value = "排序(数字越小越靠前)")
    private Integer sort;

    @ApiModelProperty(value = "是否删除")
    private Integer isDelete;

    @ApiModelProperty(value = "商城ID")
    private Integer storeId;

    @ApiModelProperty(value = "创建时间")
    private Integer createTime;

    @ApiModelProperty(value = "更新时间")
    private Integer updateTime;

    @JsonProperty("categoryIds")
    private List<Integer> categoryIds;
    @JsonProperty("serviceIds")
    private List<Integer> serviceIds;
    @JsonProperty("imagesIds")
    private List<Integer> imagesIds;

    /**
     * 商品类型(10实物商品)
     */
    private Integer goodsType;
    /**
     * 是否开启限购(0未开启 1已开启)
     */
    private Integer isRestrict;
    /**
     * 总限购数量(0为不限制)
     */
    private Integer restrictTotal;
    /**
     * 每单限购数量(0为不限制)
     */
    private Integer restrictSingle;
    /**
     * 是否单独设置配送方式(0关闭 1开启)
     */
    private Integer isIndDeliveryType;
    /**
     * 商品配送方式(仅单独设置时有效)
     */
    private Object deliveryType;

    // 单规格数据
    private String goodsPrice;
    private String linePrice;
    private Integer stockNum;
    private double goodsWeight;



    // 多规格数据
    @JsonProperty("specData")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private SpecDataDTO specData;
}
